/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


/*************************************************************************
 *\author: starlove
 *************************************************************************/
#ifndef __CC_PYTHON_IMPORT_O_ACTIONS_IMPL__
#define __CC_PYTHON_IMPORT_O_ACTIONS_IMPL__

#include "python_object_action.h"

NS_CCPY_BEGIN
	
	PYCLASS_INIT_AND_BASE(CPyAction, CPyCCObject, "CCAction", "Python CCAction Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyAction)
		PYCLASS_ADD_METHOD(CPyAction, startWithTarget)
		PYCLASS_ADD_METHOD(CPyAction, stop)
		PYCLASS_ADD_METHOD(CPyAction, step)
	PYCLASS_END_METHOD_DEF(CPyAction)
	PYCLASS_BEGIN_GETSET_DEF(CPyAction)
		PYCLASS_ADD_GET(CPyAction, Done)
		PYCLASS_ADD_GETSET(CPyAction, Target)
		PYCLASS_ADD_GETSET(CPyAction, OriginalTarget)
	PYCLASS_END_GETSET_DEF(CPyAction)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyAction)
	
	PYCLASS_METHOD_IMPL(CPyAction, startWithTarget)
	{
		PyObject *pnode = NULL;
		if( !PyArg_ParseTuple(pyArgs, "O", &pnode) )
			Py_RETURN_NONE;
		if(!PyObject_TypeCheck(pnode, CPyClassBase::GetTypeObject<CPyNode>()))
			Py_RETURN_NONE;
		CPyNode *node = (CPyNode *)pnode;
		if(!node)
			Py_RETURN_NONE;
		CC_METHOD_WRAPPER_SETER(cocos2d::CCAction *, CPyAction,  startWithTarget, (cocos2d::CCNode *)node->getCCObject());
		Py_RETURN_NONE;
	}
	PYCLASS_METHOD_IMPL(CPyAction, stop)
	{
		CC_METHOD_WRAPPER_SETER(cocos2d::CCAction *, CPyAction,  stop);
		Py_RETURN_NONE;
	}
	PYCLASS_METHOD_IMPL(CPyAction, step)
	{
		float dt = 0;
		if( !PyArg_ParseTuple(pyArgs, "f", &dt) )
			Py_RETURN_NONE;
		CC_METHOD_WRAPPER_SETER(cocos2d::CCAction *, CPyAction,  step, dt);
		Py_RETURN_NONE;
	}
	PYCLASS_GET_IMPL(CPyAction, Done)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAction *, CPyAction,  isDone, bool);
		Py_RETURN_BOOL(v);
	}
	PYCLASS_GET_IMPL(CPyAction, Target)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAction *, CPyAction,  getTarget, cocos2d::CCNode *);
		IWrapper *wrap = dynamic_cast<IWrapper *>(v);
		if(wrap)
		{
			return CPyCCObject::create_object(wrap->GetPythonType(), v);
		}else
			return (PyObject *)CPyCCObject::create<CPyNode>(v);
	}
	PYCLASS_SET_IMPL(CPyAction, Target)
	{
		if(!PyObject_TypeCheck(pyValue, CPyClassBase::GetTypeObject<CPyNode>()))
			return 0;
		CPyNode *node = (CPyNode *)pyValue;
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCAction *, CPyAction,  setTarget, (cocos2d::CCNode *)node->getCCObject());
		return 0;
	}
	PYCLASS_GET_IMPL(CPyAction, OriginalTarget)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAction *, CPyAction,  getOriginalTarget, cocos2d::CCNode *);
		IWrapper *wrap = dynamic_cast<IWrapper *>(v);
		if(wrap)
		{
			return CPyCCObject::create_object(wrap->GetPythonType(), v);
		}else
			return (PyObject *)CPyCCObject::create<CPyNode>(v);
	}
	PYCLASS_SET_IMPL(CPyAction, OriginalTarget)
	{
		if(!PyObject_TypeCheck(pyValue, CPyClassBase::GetTypeObject<CPyNode>()))
			return 0;
		CPyNode *node = (CPyNode *)pyValue;
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCAction *, CPyAction,  setOriginalTarget, (cocos2d::CCNode *)node->getCCObject());
		return 0;
	}

	CPyAction::CPyAction(){}

	int CPyAction::__init__(CPyAction *pySelf, PyObject *args, PyObject *kwds)
	{
		cocos2d::CCAction *p = cocos2d::CCAction::create();
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyFiniteTimeAction, CPyAction,  "CCFiniteTimeAction", "Python CCFiniteTimeAction Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyFiniteTimeAction)
	PYCLASS_ADD_METHOD(CPyFiniteTimeAction, reverse)
	PYCLASS_END_METHOD_DEF(CPyFiniteTimeAction)
	PYCLASS_BEGIN_GETSET_DEF(CPyFiniteTimeAction)
	PYCLASS_ADD_GETSET(CPyFiniteTimeAction, Duration)
	PYCLASS_END_GETSET_DEF(CPyFiniteTimeAction)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyFiniteTimeAction)
		
	PYCLASS_GET_IMPL(CPyFiniteTimeAction, Duration)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCFiniteTimeAction *, CPyFiniteTimeAction,  getDuration, float);
		return Py_BuildValue("f", v);
	}
	PYCLASS_SET_IMPL(CPyFiniteTimeAction, Duration)
	{
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCFiniteTimeAction *, CPyFiniteTimeAction,  setDuration, PyFloat_AsDouble(pyValue));
		return 0;
	}

	PYCLASS_METHOD_IMPL(CPyFiniteTimeAction, reverse)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCFiniteTimeAction *, CPyFiniteTimeAction,  reverse, cocos2d::CCFiniteTimeAction *);
		CPyFiniteTimeAction *act = CPyCCObject::create<CPyFiniteTimeAction>(v);
		return (PyObject *)act;
	}

	CPyFiniteTimeAction::CPyFiniteTimeAction(){}
	int CPyFiniteTimeAction::__init__(CPyFiniteTimeAction *pySelf, PyObject *args, PyObject *kwds)
	{
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPySpeed, CPyAction, "CCSpeed", "Python CCSpeed Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPySpeed)
	PYCLASS_ADD_METHOD(CPySpeed, reverse)
	PYCLASS_ADD_METHOD(CPySpeed, initWithAction)
	PYCLASS_END_METHOD_DEF(CPySpeed)
	PYCLASS_BEGIN_GETSET_DEF(CPySpeed)
	PYCLASS_ADD_GETSET(CPySpeed, Speed)
	PYCLASS_ADD_GETSET(CPySpeed, InnerAction)
	PYCLASS_END_GETSET_DEF(CPySpeed)
	PYCLASS_IMP_INTERFACE_NOINIT(CPySpeed)
	
	PYCLASS_METHOD_IMPL(CPySpeed, reverse)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCSpeed *, CPySpeed,  reverse, cocos2d::CCActionInterval *);
		CPyActionInterval *act = CPyCCObject::create<CPyActionInterval>(v);
		return (PyObject *)act;
	}
	PYCLASS_METHOD_IMPL(CPySpeed, initWithAction)
	{
		float speed = 0;
		PyObject *pact = NULL;
		if( !PyArg_ParseTuple(pyArgs, "Of", &pact, &speed) )
			Py_RETURN_NONE;
		CPyActionInterval *act = (CPyActionInterval *)pact;
		CC_METHOD_WRAPPER_GETER(cocos2d::CCSpeed *, CPySpeed,  initWithAction, bool, (cocos2d::CCActionInterval *)act->getCCObject(), speed);
		Py_RETURN_BOOL(v);
	}
	PYCLASS_GET_IMPL(CPySpeed, Speed)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCSpeed *, CPySpeed,  getSpeed, float);
		return Py_BuildValue("f", v);
	}
	PYCLASS_SET_IMPL(CPySpeed, Speed)
	{
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCSpeed *, CPySpeed,  setSpeed, PyFloat_AsDouble(pyValue));
		return 0;
	}
	PYCLASS_GET_IMPL(CPySpeed, InnerAction)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCSpeed *, CPySpeed,  getInnerAction, cocos2d::CCActionInterval *);
		CPyActionInterval *act = CPyCCObject::create<CPyActionInterval>(v);
		return (PyObject *)act;
	}
	PYCLASS_SET_IMPL(CPySpeed, InnerAction)
	{
		CPyCCObject *act = (CPyCCObject *)pyValue;
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCSpeed *, CPySpeed,  setInnerAction, (cocos2d::CCActionInterval *)act->getCCObject());
		return 0;
	}

	CPySpeed::CPySpeed(){}
	
	int CPySpeed::__init__(CPySpeed *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"action", "speed", NULL};
		float speed = 0;
		PyObject *action = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "|Of", kwlist, &action, &speed))
			return 0;
		if(!action)
			return 0;
		CPyActionInterval *act = (CPyActionInterval *)action;
		cocos2d::CCSpeed *p = cocos2d::CCSpeed::create((cocos2d::CCActionInterval *)act->getCCObject(), speed);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyFollow, CPyAction, "CCFollow", "Python CCFollow Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyFollow)
	PYCLASS_ADD_METHOD(CPyFollow, initWithTarget)
	PYCLASS_END_METHOD_DEF(CPyFollow)
	PYCLASS_BEGIN_GETSET_DEF(CPyFollow)
	PYCLASS_ADD_GETSET(CPyFollow, BoundarySet)
	PYCLASS_END_GETSET_DEF(CPyFollow)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyFollow)
	
	PYCLASS_METHOD_IMPL(CPyFollow, initWithTarget)
	{
		PyObject *pnode = NULL;
		PyObject *prect = NULL;
		if( !PyArg_ParseTuple(pyArgs, "OO", &pnode, &prect) )
			Py_RETURN_NONE;
		CPyNode *node = (CPyNode *)pnode;
		CPyRect *rect = (CPyRect *)prect;
		CC_METHOD_WRAPPER_GETER(cocos2d::CCFollow *, CPyFollow,  initWithTarget, bool, (cocos2d::CCNode *)node->getCCObject(), rect->getCCObject());
		Py_RETURN_BOOL(v);
	}
	PYCLASS_GET_IMPL(CPyFollow, BoundarySet)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCFollow *, CPyFollow,  isBoundarySet, bool);
		Py_RETURN_BOOL(v);
	}
	PYCLASS_SET_IMPL(CPyFollow, BoundarySet)
	{
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCFollow *, CPyFollow,  setBoudarySet, pyValue == Py_True);
		return 0;
	}

	CPyFollow::CPyFollow(){}
	
	int CPyFollow::__init__(CPyFollow *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"node", "rect", NULL};
		PyObject *pnode = NULL;
		PyObject *prect = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "|OO", kwlist, &pnode, &prect))
			return 0;
		if(!pnode)
			return 0;
		CPyNode *node = (CPyNode *)pnode;
		CPyRect *rect = (CPyRect *)prect;
		cocos2d::CCFollow *p = cocos2d::CCFollow::create((cocos2d::CCNode *)node->getCCObject(), rect->getCCObject());
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyActionInterval, CPyFiniteTimeAction, "CCActionInterval", "Python CCActionInterval Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyActionInterval)
	PYCLASS_ADD_METHOD(CPyActionInterval, reverse)
	PYCLASS_ADD_METHOD(CPyActionInterval, initWithDuration)
	PYCLASS_END_METHOD_DEF(CPyActionInterval)
	PYCLASS_BEGIN_GETSET_DEF(CPyActionInterval)
	PYCLASS_ADD_GET(CPyActionInterval, Elapsed)
	PYCLASS_ADD_GETSET(CPyActionInterval, AmplitudeRate)
	PYCLASS_END_GETSET_DEF(CPyActionInterval)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyActionInterval)
		
	PYCLASS_METHOD_IMPL(CPyActionInterval, reverse)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCActionInterval *, CPyActionInterval,  reverse, cocos2d::CCActionInterval *);
		CPyActionInterval *act = CPyCCObject::create<CPyActionInterval>(v);
		return (PyObject *)act;
	}
	PYCLASS_METHOD_IMPL(CPyActionInterval, initWithDuration)
	{
		float f = 0;
		if( !PyArg_ParseTuple(pyArgs, "f", &f) )
			Py_RETURN_NONE;
		CC_METHOD_WRAPPER_GETER(cocos2d::CCActionInterval *, CPyActionInterval,  initWithDuration, bool, f);
		Py_RETURN_BOOL(v);
	}
	PYCLASS_GET_IMPL(CPyActionInterval, Elapsed)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCActionInterval *, CPyActionInterval,  getElapsed, float);
		return Py_BuildValue("f", v);
	}
	PYCLASS_GET_IMPL(CPyActionInterval, AmplitudeRate)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCActionInterval *, CPyActionInterval,  getAmplitudeRate, float);
		return Py_BuildValue("f", v);
	}
	PYCLASS_SET_IMPL(CPyActionInterval, AmplitudeRate)
	{
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCActionInterval *, CPyActionInterval,  setAmplitudeRate, PyFloat_AsDouble(pyValue));
		return 0;
	}

	CPyActionInterval::CPyActionInterval(){}

	int CPyActionInterval::__init__(CPyActionInterval *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"d", NULL};
		float d = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "f", kwlist, &d))
			return 0;
		cocos2d::CCActionInterval *p = cocos2d::CCActionInterval::create(d);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPySequence, CPyActionInterval, "CCSequence", "Python CCSequence Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPySequence)
	PYCLASS_END_METHOD_DEF(CPySequence)
	PYCLASS_BEGIN_GETSET_DEF(CPySequence)
	PYCLASS_END_GETSET_DEF(CPySequence)
	PYCLASS_IMP_INTERFACE_NOINIT(CPySequence)

	CPySequence::CPySequence(){}

	int CPySequence::__init__(CPySequence *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"actions", NULL};
		PyObject * actions = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &actions))
			return 0;
		cocos2d::CCArray *arr = CCPyDataConvert::CCArrayFromPyList(actions);
		cocos2d::CCSequence *p = cocos2d::CCSequence::create(arr);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyRepeat, CPyActionInterval, "CCRepeat", "Python CCRepeat Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyRepeat)
	PYCLASS_END_METHOD_DEF(CPyRepeat)
	PYCLASS_BEGIN_GETSET_DEF(CPyRepeat)
	PYCLASS_ADD_GETSET(CPyRepeat, InnerAction)
	PYCLASS_END_GETSET_DEF(CPyRepeat)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyRepeat)

	CPyRepeat::CPyRepeat(){}

	int CPyRepeat::__init__(CPyRepeat *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"action", "times", NULL};
		PyObject * action = NULL;
		unsigned int times = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "OI", kwlist, &action, &times))
			return 0;
		CPyFiniteTimeAction *act = (CPyFiniteTimeAction *)action;
		cocos2d::CCRepeat *p = cocos2d::CCRepeat::create((cocos2d::CCFiniteTimeAction *)act->getCCObject(), times);
		pySelf->setCCObject(p);
		return 0;
	}
	PYCLASS_GET_IMPL(CPyRepeat, InnerAction)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCRepeat *, CPyRepeat,  getInnerAction, cocos2d::CCFiniteTimeAction *);
		CPyFiniteTimeAction *act = CPyCCObject::create<CPyFiniteTimeAction>(v);
		return (PyObject *)act;
	}
	PYCLASS_SET_IMPL(CPyRepeat, InnerAction)
	{
		CPyCCObject *act = (CPyCCObject *)pyValue;
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCRepeat *, CPyRepeat,  setInnerAction, (cocos2d::CCFiniteTimeAction *)act->getCCObject());
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyRepeatForever, CPyActionInterval, "CCRepeatForever", "Python CCRepeatForever Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyRepeatForever)
	PYCLASS_END_METHOD_DEF(CPyRepeatForever)
	PYCLASS_BEGIN_GETSET_DEF(CPyRepeatForever)
	PYCLASS_ADD_GETSET(CPyRepeatForever, InnerAction)
	PYCLASS_END_GETSET_DEF(CPyRepeatForever)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyRepeatForever)

	CPyRepeatForever::CPyRepeatForever(){}

	int CPyRepeatForever::__init__(CPyRepeatForever *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"action", NULL};
		PyObject * action = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &action))
			return 0;
		CPyActionInterval *act = (CPyActionInterval *)action;
		cocos2d::CCRepeatForever *p = cocos2d::CCRepeatForever::create((cocos2d::CCActionInterval *)act->getCCObject());
		pySelf->setCCObject(p);
		return 0;
	}
	PYCLASS_GET_IMPL(CPyRepeatForever, InnerAction)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCRepeatForever *, CPyRepeatForever,  getInnerAction, cocos2d::CCActionInterval *);
		CPyActionInterval *act = CPyCCObject::create<CPyActionInterval>(v);
		return (PyObject *)act;
	}
	PYCLASS_SET_IMPL(CPyRepeatForever, InnerAction)
	{
		CPyCCObject *act = (CPyCCObject *)pyValue;
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCRepeatForever *, CPyRepeatForever,  setInnerAction, (cocos2d::CCActionInterval *)act->getCCObject());
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPySpawn, CPyActionInterval, "CCSpawn", "Python CCSpawn Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPySpawn)
	PYCLASS_END_METHOD_DEF(CPySpawn)
	PYCLASS_BEGIN_GETSET_DEF(CPySpawn)
	PYCLASS_END_GETSET_DEF(CPySpawn)
	PYCLASS_IMP_INTERFACE_NOINIT(CPySpawn)

	CPySpawn::CPySpawn(){}

	int CPySpawn::__init__(CPySpawn *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"actions", NULL};
		PyObject * actions = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &actions))
			return 0;
		cocos2d::CCArray *arr = CCPyDataConvert::CCArrayFromPyList(actions);
		cocos2d::CCSpawn *p = cocos2d::CCSpawn::create(arr);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyRotateTo, CPyActionInterval, "CCRotateTo", "Python CCRotateTo Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyRotateTo)
	PYCLASS_END_METHOD_DEF(CPyRotateTo)
	PYCLASS_BEGIN_GETSET_DEF(CPyRotateTo)
	PYCLASS_END_GETSET_DEF(CPyRotateTo)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyRotateTo)
	
	CPyRotateTo::CPyRotateTo(){}

	int CPyRotateTo::__init__(CPyRotateTo *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"fDuration", "fDeltaAngle", "fDeltaAngleX", "fDeltaAngleY", NULL};
		float fDuration = 0;
		float fDeltaAngle = -1;
		float fDeltaAngleX = 0;
		float fDeltaAngleY = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "f|fff", kwlist, &fDuration, &fDeltaAngle, &fDeltaAngleX, &fDeltaAngleY))
			return 0;
		if(fDeltaAngle >= 0)
		{
			cocos2d::CCRotateTo *p = cocos2d::CCRotateTo::create(fDuration, fDeltaAngle);
			pySelf->setCCObject(p);
		}else
		{
			cocos2d::CCRotateTo *p = cocos2d::CCRotateTo::create(fDuration, fDeltaAngleX, fDeltaAngleY);
			pySelf->setCCObject(p);
		}
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyRotateBy, CPyActionInterval, "CCRotateBy", "Python CCRotateBy Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyRotateBy)
	PYCLASS_END_METHOD_DEF(CPyRotateBy)
	PYCLASS_BEGIN_GETSET_DEF(CPyRotateBy)
	PYCLASS_END_GETSET_DEF(CPyRotateBy)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyRotateBy)

	CPyRotateBy::CPyRotateBy(){}

	int CPyRotateBy::__init__(CPyRotateBy *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"fDuration", "fDeltaAngle", "fDeltaAngleX", "fDeltaAngleY", NULL};
		float fDuration = 0;
		float fDeltaAngle = -1;
		float fDeltaAngleX = 0;
		float fDeltaAngleY = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "f|fff", kwlist, &fDuration, &fDeltaAngle, &fDeltaAngleX, &fDeltaAngleY))
			return 0;
		if(fDeltaAngle >= 0)
		{
			cocos2d::CCRotateBy *p = cocos2d::CCRotateBy::create(fDuration, fDeltaAngle);
			pySelf->setCCObject(p);
		}else
		{
			cocos2d::CCRotateBy *p = cocos2d::CCRotateBy::create(fDuration, fDeltaAngleX, fDeltaAngleY);
			pySelf->setCCObject(p);
		}
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyMoveBy, CPyActionInterval, "CCMoveBy", "Python CCMoveBy Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyMoveBy)
	PYCLASS_END_METHOD_DEF(CPyMoveBy)
	PYCLASS_BEGIN_GETSET_DEF(CPyMoveBy)
	PYCLASS_END_GETSET_DEF(CPyMoveBy)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyMoveBy)

	CPyMoveBy::CPyMoveBy(){}

	int CPyMoveBy::__init__(CPyMoveBy *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", "deltaPosition", NULL};
		float fDuration = 0;
		PyObject *deltaPosition = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fO", kwlist, &fDuration, &deltaPosition))
			return 0;
		if(!deltaPosition || !PyObject_TypeCheck(deltaPosition, CPyClassBase::GetTypeObject<CPyPoint>()))
			return 0;

		CPyPoint *pt = (CPyPoint *)deltaPosition;
		cocos2d::CCMoveBy *p = cocos2d::CCMoveBy::create(fDuration, pt->getCCObject());
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyMoveTo, CPyMoveBy, "CCMoveTo", "Python CCMoveTo Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyMoveTo)
	PYCLASS_END_METHOD_DEF(CPyMoveTo)
	PYCLASS_BEGIN_GETSET_DEF(CPyMoveTo)
	PYCLASS_END_GETSET_DEF(CPyMoveTo)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyMoveTo)
	
	CPyMoveTo::CPyMoveTo(){}
	
	int CPyMoveTo::__init__(CPyMoveTo *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", "deltaPosition", NULL};
		float fDuration = 0;
		PyObject *deltaPosition = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fO", kwlist, &fDuration, &deltaPosition))
			return 0;
		if(!deltaPosition || !PyObject_TypeCheck(deltaPosition, CPyClassBase::GetTypeObject<CPyPoint>()))
			return 0;

		CPyPoint *pt = (CPyPoint *)deltaPosition;
		cocos2d::CCMoveTo *p = cocos2d::CCMoveTo::create(fDuration, pt->getCCObject());
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPySkewTo, CPyActionInterval, "CCSkewTo", "Python CCSkewTo Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPySkewTo)
	PYCLASS_END_METHOD_DEF(CPySkewTo)
	PYCLASS_BEGIN_GETSET_DEF(CPySkewTo)
	PYCLASS_END_GETSET_DEF(CPySkewTo)
	PYCLASS_IMP_INTERFACE_NOINIT(CPySkewTo)

	CPySkewTo::CPySkewTo(){}

	int CPySkewTo::__init__(CPySkewTo *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"t", "sx", "sy", NULL};
		float t = 0;
		float sx = 0;
		float sy = 0;		
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fff", kwlist, &t, &sx, &sy))
			return 0;

		cocos2d::CCSkewTo *p = cocos2d::CCSkewTo::create(t, sx, sy);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPySkewBy, CPySkewTo, "CCSkewBy", "Python CCSkewBy Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPySkewBy)
	PYCLASS_END_METHOD_DEF(CPySkewBy)
	PYCLASS_BEGIN_GETSET_DEF(CPySkewBy)
	PYCLASS_END_GETSET_DEF(CPySkewBy)
	PYCLASS_IMP_INTERFACE_NOINIT(CPySkewBy)

	CPySkewBy::CPySkewBy(){}

	int CPySkewBy::__init__(CPySkewBy *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"t", "sx", "sy", NULL};
		float t = 0;
		float sx = 0;
		float sy = 0;		
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fff", kwlist, &t, &sx, &sy))
			return 0;

		cocos2d::CCSkewBy *p = cocos2d::CCSkewBy::create(t, sx, sy);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyJumpBy, CPyActionInterval, "CCJumpBy", "Python CCJumpBy Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyJumpBy)
	PYCLASS_END_METHOD_DEF(CPyJumpBy)
	PYCLASS_BEGIN_GETSET_DEF(CPyJumpBy)
	PYCLASS_END_GETSET_DEF(CPyJumpBy)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyJumpBy)
	
	CPyJumpBy::CPyJumpBy(){}

	int CPyJumpBy::__init__(CPyJumpBy *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", "position", "height", "jumps", NULL};
		float duration = 0;
		PyObject *position = NULL;
		float height = 0;
		unsigned int jumps = 0;		
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fOfI", kwlist, &duration, &position, &height, &jumps))
			return 0;
		if(!position || !PyObject_TypeCheck(position, CPyClassBase::GetTypeObject<CPyPoint>()))
			return 0;
		CPyPoint *pos = (CPyPoint *)position;
		cocos2d::CCJumpBy *p = cocos2d::CCJumpBy::create(duration, pos->getCCObject(), height, jumps);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyJumpTo, CPyJumpBy, "CCJumpTo", "Python CCJumpTo Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyJumpTo)
	PYCLASS_END_METHOD_DEF(CPyJumpTo)
	PYCLASS_BEGIN_GETSET_DEF(CPyJumpTo)
	PYCLASS_END_GETSET_DEF(CPyJumpTo)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyJumpTo)

	CPyJumpTo::CPyJumpTo(){}

	int CPyJumpTo::__init__(CPyJumpTo *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", "position", "height", "jumps", NULL};
		float duration = 0;
		PyObject *position = NULL;
		float height = 0;
		unsigned int jumps = 0;		
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fOfI", kwlist, &duration, &position, &height, &jumps))
			return 0;
		if(!position || !PyObject_TypeCheck(position, CPyClassBase::GetTypeObject<CPyPoint>()))
			return 0;
		CPyPoint *pos = (CPyPoint *)position;
		cocos2d::CCJumpTo *p = cocos2d::CCJumpTo::create(duration, pos->getCCObject(), height, jumps);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyBezierBy, CPyActionInterval, "CCBezierBy", "Python CCBezierBy Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyBezierBy)
	PYCLASS_END_METHOD_DEF(CPyBezierBy)
	PYCLASS_BEGIN_GETSET_DEF(CPyBezierBy)
	PYCLASS_END_GETSET_DEF(CPyBezierBy)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyBezierBy)

	CPyBezierBy::CPyBezierBy(){}

	int CPyBezierBy::__init__(CPyBezierBy *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"t", "BezierConfig", NULL};
		float t = 0;
		PyObject *BezierConfig = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fO", kwlist, &t, &BezierConfig))
			return 0;
		if(!BezierConfig || !PySequence_Check(BezierConfig) || PySequence_Size(BezierConfig) != 3)
			return 0;
		cocos2d::_ccBezierConfig config;
		PyObject *o = PySequence_GetItem(BezierConfig, 0);
		if(!o || !PyObject_TypeCheck(o, CPyClassBase::GetTypeObject<CPyPoint>()))
			return 0;
		config.endPosition = ((CPyPoint *)o)->getCCObject();
		o = PySequence_GetItem(BezierConfig, 1);
		if(!o || !PyObject_TypeCheck(o, CPyClassBase::GetTypeObject<CPyPoint>()))
			return 0;
		config.controlPoint_1 = ((CPyPoint *)o)->getCCObject();
		o = PySequence_GetItem(BezierConfig, 2);
		if(!o || !PyObject_TypeCheck(o, CPyClassBase::GetTypeObject<CPyPoint>()))
			return 0;
		config.controlPoint_2 = ((CPyPoint *)o)->getCCObject();
		cocos2d::CCBezierBy *p = cocos2d::CCBezierBy::create(t, config);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyBezierTo, CPyBezierBy, "CCBezierTo", "Python CCBezierTo Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyBezierTo)
	PYCLASS_END_METHOD_DEF(CPyBezierTo)
	PYCLASS_BEGIN_GETSET_DEF(CPyBezierTo)
	PYCLASS_END_GETSET_DEF(CPyBezierTo)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyBezierTo)

	CPyBezierTo::CPyBezierTo(){}

	int CPyBezierTo::__init__(CPyBezierTo *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"t", "BezierConfig", NULL};
		float t = 0;
		PyObject *BezierConfig = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fO", kwlist, &t, &BezierConfig))
			return 0;
		if(!BezierConfig || !PySequence_Check(BezierConfig) || PySequence_Size(BezierConfig) != 3)
			return 0;
		cocos2d::_ccBezierConfig config;
		PyObject *o = PySequence_GetItem(BezierConfig, 0);
		if(!o || !PyObject_TypeCheck(o, CPyClassBase::GetTypeObject<CPyPoint>()))
			return 0;
		config.endPosition = ((CPyPoint *)o)->getCCObject();
		o = PySequence_GetItem(BezierConfig, 1);
		if(!o || !PyObject_TypeCheck(o, CPyClassBase::GetTypeObject<CPyPoint>()))
			return 0;
		config.controlPoint_1 = ((CPyPoint *)o)->getCCObject();
		o = PySequence_GetItem(BezierConfig, 2);
		if(!o || !PyObject_TypeCheck(o, CPyClassBase::GetTypeObject<CPyPoint>()))
			return 0;
		config.controlPoint_2 = ((CPyPoint *)o)->getCCObject();
		cocos2d::CCBezierTo *p = cocos2d::CCBezierTo::create(t, config);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyScaleTo, CPyActionInterval, "CCScaleTo", "Python CCScaleTo Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyScaleTo)
	PYCLASS_END_METHOD_DEF(CPyScaleTo)
	PYCLASS_BEGIN_GETSET_DEF(CPyScaleTo)
	PYCLASS_END_GETSET_DEF(CPyScaleTo)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyScaleTo)

	CPyScaleTo::CPyScaleTo(){}

	int CPyScaleTo::__init__(CPyScaleTo *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", "s", "sx", "sy", NULL};
		float duration = 0;
		float s = -1;
		float sx = 0;
		float sy = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "f|fff", kwlist, &duration, &s, &sx, &sy))
			return 0;
		if(s >= 0)
		{
			cocos2d::CCScaleTo *p = cocos2d::CCScaleTo::create(duration, s);
			pySelf->setCCObject(p);
		}else
		{
			cocos2d::CCScaleTo *p = cocos2d::CCScaleTo::create(duration, sx, sy);
			pySelf->setCCObject(p);
		}
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyScaleBy, CPyScaleTo, "CCScaleBy", "Python CCScaleBy Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyScaleBy)
	PYCLASS_END_METHOD_DEF(CPyScaleBy)
	PYCLASS_BEGIN_GETSET_DEF(CPyScaleBy)
	PYCLASS_END_GETSET_DEF(CPyScaleBy)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyScaleBy)

	CPyScaleBy::CPyScaleBy(){}

	int CPyScaleBy::__init__(CPyScaleBy *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", "s", "sx", "sy", NULL};
		float duration = 0;
		float s = -1;
		float sx = 0;
		float sy = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "f|fff", kwlist, &duration, &s, &sx, &sy))
			return 0;
		if(s >= 0)
		{
			cocos2d::CCScaleBy *p = cocos2d::CCScaleBy::create(duration, s);
			pySelf->setCCObject(p);
		}else
		{
			cocos2d::CCScaleBy *p = cocos2d::CCScaleBy::create(duration, sx, sy);
			pySelf->setCCObject(p);
		}
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyBlink, CPyActionInterval, "CCBlink", "Python CCBlink Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyBlink)
	PYCLASS_END_METHOD_DEF(CPyBlink)
	PYCLASS_BEGIN_GETSET_DEF(CPyBlink)
	PYCLASS_END_GETSET_DEF(CPyBlink)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyBlink)

	CPyBlink::CPyBlink(){}

	int CPyBlink::__init__(CPyBlink *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", "uBlinks", NULL};
		float duration = 0;
		unsigned int uBlinks = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fI", kwlist, &duration, &uBlinks))
			return 0;
		cocos2d::CCBlink *p = cocos2d::CCBlink::create(duration, uBlinks);
		pySelf->setCCObject(p);		
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyFadeIn, CPyActionInterval, "CCFadeIn", "Python CCFadeIn Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyFadeIn)
	PYCLASS_END_METHOD_DEF(CPyFadeIn)
	PYCLASS_BEGIN_GETSET_DEF(CPyFadeIn)
	PYCLASS_END_GETSET_DEF(CPyFadeIn)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyFadeIn)

	CPyFadeIn::CPyFadeIn(){}

	int CPyFadeIn::__init__(CPyFadeIn *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", NULL};
		float duration = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "f", kwlist, &duration))
			return 0;
		cocos2d::CCFadeIn *p = cocos2d::CCFadeIn::create(duration);
		pySelf->setCCObject(p);		
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyFadeOut, CPyActionInterval, "CCFadeOut", "Python CCFadeOut Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyFadeOut)
	PYCLASS_END_METHOD_DEF(CPyFadeOut)
	PYCLASS_BEGIN_GETSET_DEF(CPyFadeOut)
	PYCLASS_END_GETSET_DEF(CPyFadeOut)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyFadeOut)

	CPyFadeOut::CPyFadeOut(){}

	int CPyFadeOut::__init__(CPyFadeOut *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", NULL};
		float duration = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "f", kwlist, &duration))
			return 0;
		cocos2d::CCFadeOut *p = cocos2d::CCFadeOut::create(duration);
		pySelf->setCCObject(p);		
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyFadeTo, CPyActionInterval, "CCFadeTo", "Python CCFadeTo Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyFadeTo)
	PYCLASS_END_METHOD_DEF(CPyFadeTo)
	PYCLASS_BEGIN_GETSET_DEF(CPyFadeTo)
	PYCLASS_END_GETSET_DEF(CPyFadeTo)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyFadeTo)

	CPyFadeTo::CPyFadeTo(){}

	int CPyFadeTo::__init__(CPyFadeTo *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", "opacity", NULL};
		float duration = 0;
		unsigned int opacity = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fI", kwlist, &duration, &opacity))
			return 0;
		cocos2d::CCFadeTo *p = cocos2d::CCFadeTo::create(duration, (GLubyte)opacity);
		pySelf->setCCObject(p);		
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyTintTo, CPyActionInterval, "CCTintTo", "Python CCTintTo Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyTintTo)
	PYCLASS_END_METHOD_DEF(CPyTintTo)
	PYCLASS_BEGIN_GETSET_DEF(CPyTintTo)
	PYCLASS_END_GETSET_DEF(CPyTintTo)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyTintTo)

	CPyTintTo::CPyTintTo(){}

	int CPyTintTo::__init__(CPyTintTo *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", "r", "g", "b", NULL};
		float duration = 0;
		unsigned int r = 0;
		unsigned int g = 0;
		unsigned int b = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fIII", kwlist, &duration, &r, &g, &b))
			return 0;
		cocos2d::CCTintTo *p = cocos2d::CCTintTo::create(duration, (GLubyte)r, (GLubyte)g, (GLubyte)b);
		pySelf->setCCObject(p);		
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyTintBy, CPyActionInterval, "CCTintBy", "Python CCTintBy Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyTintBy)
	PYCLASS_END_METHOD_DEF(CPyTintBy)
	PYCLASS_BEGIN_GETSET_DEF(CPyTintBy)
	PYCLASS_END_GETSET_DEF(CPyTintBy)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyTintBy)

	CPyTintBy::CPyTintBy(){}

	int CPyTintBy::__init__(CPyTintBy *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", "r", "g", "b", NULL};
		float duration = 0;
		unsigned int r = 0;
		unsigned int g = 0;
		unsigned int b = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "fIII", kwlist, &duration, &r, &g, &b))
			return 0;
		cocos2d::CCTintBy *p = cocos2d::CCTintBy::create(duration, (GLshort)r, (GLshort)g, (GLshort)b);
		pySelf->setCCObject(p);		
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyDelayTime, CPyActionInterval, "CCDelayTime", "Python CCDelayTime Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyDelayTime)
	PYCLASS_END_METHOD_DEF(CPyDelayTime)
	PYCLASS_BEGIN_GETSET_DEF(CPyDelayTime)
	PYCLASS_END_GETSET_DEF(CPyDelayTime)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyDelayTime)

	CPyDelayTime::CPyDelayTime(){}

	int CPyDelayTime::__init__(CPyDelayTime *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"duration", NULL};
		float duration = 0;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "f", kwlist, &duration))
			return 0;
		cocos2d::CCDelayTime *p = cocos2d::CCDelayTime::create(duration);
		pySelf->setCCObject(p);		
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyReverseTime, CPyActionInterval, "CCReverseTime", "Python CCReverseTime Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyReverseTime)
	PYCLASS_END_METHOD_DEF(CPyReverseTime)
	PYCLASS_BEGIN_GETSET_DEF(CPyReverseTime)
	PYCLASS_END_GETSET_DEF(CPyReverseTime)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyReverseTime)
	
	CPyReverseTime::CPyReverseTime(){}

	int CPyReverseTime::__init__(CPyReverseTime *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"action", NULL};
		PyObject *action = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &action))
			return 0;
		if(!action)
			return 0;
		CPyFiniteTimeAction *act = (CPyFiniteTimeAction *)action;
		cocos2d::CCReverseTime *p = cocos2d::CCReverseTime::create((cocos2d::CCFiniteTimeAction *)act->getCCObject());
		pySelf->setCCObject(p);		
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyAnimate, CPyActionInterval, "CCAnimate", "Python CCAnimate Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyAnimate)
	PYCLASS_END_METHOD_DEF(CPyAnimate)
	PYCLASS_BEGIN_GETSET_DEF(CPyAnimate)
	PYCLASS_ADD_GETSET(CPyAnimate, Animation)
	PYCLASS_END_GETSET_DEF(CPyAnimate)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyAnimate)

	CPyAnimate::CPyAnimate(){}

	int CPyAnimate::__init__(CPyAnimate *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"animation", NULL};
		PyObject *animation = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &animation))
			return 0;
		if(!animation || !PyObject_TypeCheck(animation, CPyClassBase::GetTypeObject<CPyAnimation>()))
			return 0;
		CPyAnimation *ani = (CPyAnimation *)animation;
		cocos2d::CCAnimate *p = cocos2d::CCAnimate::create((cocos2d::CCAnimation *)ani->getCCObject());
		pySelf->setCCObject(p);
		return 0;
	}
	PYCLASS_SET_IMPL(CPyAnimate, Animation)
	{
		if(!pyValue || !PyObject_TypeCheck(pyValue, CPyClassBase::GetTypeObject<CPyAnimation>()))
			return 0;
		CPyAnimation *ani = (CPyAnimation *)pyValue;
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCAnimate *, CPyAnimate, setAnimation, (cocos2d::CCAnimation *)ani->getCCObject());
		return 0;
	}
	PYCLASS_GET_IMPL(CPyAnimate, Animation)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAnimate *, CPyAnimate, getAnimation, cocos2d::CCAnimation *);
		CPyAnimation *ani = CPyCCObject::create<CPyAnimation>(v);
		return (PyObject *)ani;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyTargetedAction, CPyActionInterval, "CCTargetedAction", "Python CCTargetedAction Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyTargetedAction)
	PYCLASS_END_METHOD_DEF(CPyTargetedAction)
	PYCLASS_BEGIN_GETSET_DEF(CPyTargetedAction)
	PYCLASS_ADD_GETSET(CPyTargetedAction, ForcedTarget)
	PYCLASS_END_GETSET_DEF(CPyTargetedAction)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyTargetedAction)

	CPyTargetedAction::CPyTargetedAction(){}

	int CPyTargetedAction::__init__(CPyTargetedAction *pySelf, PyObject *args, PyObject *kwds)
	{		
		if( !args )
			return 0;
		static char* kwlist[] = {"target", "action", NULL};
		PyObject *target = NULL;
		PyObject *action = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &target, &action))
			return 0;
		if(!target || !action)
			return 0;
		CPyNode *node = (CPyNode *)target;
		CPyFiniteTimeAction *act = (CPyFiniteTimeAction *)action;
		cocos2d::CCTargetedAction *p = cocos2d::CCTargetedAction::create((cocos2d::CCNode *)node->getCCObject(), (cocos2d::CCFiniteTimeAction *)act->getCCObject());
		pySelf->setCCObject(p);
		return 0;
	}
	PYCLASS_SET_IMPL(CPyTargetedAction, ForcedTarget)
	{
		if(!pyValue)
			return 0;
		CPyNode *node = (CPyNode *)pyValue;
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCTargetedAction *, CPyTargetedAction, setForcedTarget, (cocos2d::CCNode *)node->getCCObject());
		return 0;
	}
	PYCLASS_GET_IMPL(CPyTargetedAction, ForcedTarget)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCTargetedAction *, CPyTargetedAction, getForcedTarget, cocos2d::CCNode *);
		CPyNode *node = CPyCCObject::create<CPyNode>(v);
		return (PyObject *)node;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyActionInstant, CPyFiniteTimeAction, "CCActionInstant", "Python CCActionInstant Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyActionInstant)
	PYCLASS_END_METHOD_DEF(CPyActionInstant)
	PYCLASS_BEGIN_GETSET_DEF(CPyActionInstant)
	PYCLASS_END_GETSET_DEF(CPyActionInstant)
	PYCLASS_IMP_INTERFACE(CPyActionInstant)

	CPyActionInstant::CPyActionInstant(){}

	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyShow, CPyActionInstant, "CCShow", "Python CCShow Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyShow)
	PYCLASS_END_METHOD_DEF(CPyShow)
	PYCLASS_BEGIN_GETSET_DEF(CPyShow)
	PYCLASS_END_GETSET_DEF(CPyShow)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyShow)

	CPyShow::CPyShow(){}

	int CPyShow::__init__(CPyShow *pySelf, PyObject *args, PyObject *kwds)
	{
		cocos2d::CCShow *p = cocos2d::CCShow::create();
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyHide, CPyActionInstant, "CCHide", "Python CCHide Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyHide)
	PYCLASS_END_METHOD_DEF(CPyHide)
	PYCLASS_BEGIN_GETSET_DEF(CPyHide)
	PYCLASS_END_GETSET_DEF(CPyHide)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyHide)

	CPyHide::CPyHide(){}

	int CPyHide::__init__(CPyHide *pySelf, PyObject *args, PyObject *kwds)
	{
		cocos2d::CCHide *p = cocos2d::CCHide::create();
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyToggleVisibility, CPyActionInstant, "CCToggleVisibility", "Python CCToggleVisibility Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyToggleVisibility)
	PYCLASS_END_METHOD_DEF(CPyToggleVisibility)
	PYCLASS_BEGIN_GETSET_DEF(CPyToggleVisibility)
	PYCLASS_END_GETSET_DEF(CPyToggleVisibility)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyToggleVisibility)

	CPyToggleVisibility::CPyToggleVisibility(){}

	int CPyToggleVisibility::__init__(CPyToggleVisibility *pySelf, PyObject *args, PyObject *kwds)
	{
		cocos2d::CCToggleVisibility *p = cocos2d::CCToggleVisibility::create();
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyRemoveSelf, CPyActionInstant, "CCRemoveSelf", "Python CCRemoveSelf Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyRemoveSelf)
	PYCLASS_END_METHOD_DEF(CPyRemoveSelf)
	PYCLASS_BEGIN_GETSET_DEF(CPyRemoveSelf)
	PYCLASS_END_GETSET_DEF(CPyRemoveSelf)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyRemoveSelf)

	CPyRemoveSelf::CPyRemoveSelf(){}

	int CPyRemoveSelf::__init__(CPyRemoveSelf *pySelf, PyObject *args, PyObject *kwds)
	{
		if( !args )
			return 0;
		static char* kwlist[] = {"isNeedCleanUp", NULL};
		PyObject *isNeedCleanUp = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "|O", kwlist, &isNeedCleanUp))
			return 0;
		bool b = (isNeedCleanUp != Py_False);
		cocos2d::CCRemoveSelf *p = cocos2d::CCRemoveSelf::create(b);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyFlipX, CPyActionInstant, "CCFlipX", "Python CCFlipX Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyFlipX)
	PYCLASS_END_METHOD_DEF(CPyFlipX)
	PYCLASS_BEGIN_GETSET_DEF(CPyFlipX)
	PYCLASS_END_GETSET_DEF(CPyFlipX)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyFlipX)

	CPyFlipX::CPyFlipX(){}

	int CPyFlipX::__init__(CPyFlipX *pySelf, PyObject *args, PyObject *kwds)
	{
		if( !args )
			return 0;
		static char* kwlist[] = {"x", NULL};
		PyObject *x = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &x))
			return 0;
		bool b = (x != Py_False);
		cocos2d::CCFlipX *p = cocos2d::CCFlipX::create(b);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyFlipY, CPyActionInstant, "CCFlipY", "Python CCFlipY Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyFlipY)
	PYCLASS_END_METHOD_DEF(CPyFlipY)
	PYCLASS_BEGIN_GETSET_DEF(CPyFlipY)
	PYCLASS_END_GETSET_DEF(CPyFlipY)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyFlipY)

	CPyFlipY::CPyFlipY(){}

	int CPyFlipY::__init__(CPyFlipY *pySelf, PyObject *args, PyObject *kwds)
	{
		if( !args )
			return 0;
		static char* kwlist[] = {"x", NULL};
		PyObject *x = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &x))
			return 0;
		bool b = (x != Py_False);
		cocos2d::CCFlipY *p = cocos2d::CCFlipY::create(b);
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyPlace, CPyActionInstant, "CCPlace", "Python CCPlace Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyPlace)
	PYCLASS_END_METHOD_DEF(CPyPlace)
	PYCLASS_BEGIN_GETSET_DEF(CPyPlace)
	PYCLASS_END_GETSET_DEF(CPyPlace)
	PYCLASS_IMP_INTERFACE_NOINIT(CPyPlace)

	CPyPlace::CPyPlace(){}

	int CPyPlace::__init__(CPyPlace *pySelf, PyObject *args, PyObject *kwds)
	{
		if( !args )
			return 0;
		static char* kwlist[] = {"pos", NULL};
		PyObject *pos = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &pos))
			return 0;
		if(!pos || !PyObject_TypeCheck(pos, CPyClassBase::GetTypeObject<CPyPoint>()))
			return 0;
		CPyPoint *pt = (CPyPoint *)pos;
		cocos2d::CCPlace *p = cocos2d::CCPlace::create(pt->getCCObject());
		pySelf->setCCObject(p);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	
	CC_OBJECT_WRAPPER_IMPL(CCCallFuncND, CPyCallFunc)

	PYCLASS_INIT_AND_BASE(CPyCallFunc, CPyActionInstant, "CCCallFunc", "Python CCCallFunc Action-Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyCallFunc)
	PYCLASS_END_METHOD_DEF(CPyCallFunc)
	PYCLASS_BEGIN_GETSET_DEF(CPyCallFunc)
	PYCLASS_END_GETSET_DEF(CPyCallFunc)
	PYCLASS_IMP_INTERFACE_NEW(CPyCallFunc)
	
	void CPyCallFunc::__del__(CPyCallFunc *self)
	{
		CCLog("[PYTHON] >>> [DELETE] CPyCallFunc");
		if(self->GetCallInfo())
			delete self->GetCallInfo();
		self->SetCallInfo(NULL);
		self->ob_type->tp_free(self);
	}

	int CPyCallFunc::__init__(CPyCallFunc *pySelf, PyObject *args, PyObject *kwds)
	{
		pySelf->SetCallInfo(NULL);
		if( !args )
			return 0;
		static char* kwlist[] = {"func", "param", "has_self", NULL};
		PyObject *func = NULL;
		PyObject *param = NULL;
		PyObject *has_self = NULL;
		if(!PyArg_ParseTupleAndKeywords(args, kwds, "O|OO", kwlist, &func, &param, &has_self))
			return 0;
		if(!func || !PyCallable_Check(func))
			return 0;
		Py_XINCREF(func);
		LPY_CALLFUNC_CB_INFO info = new PY_CALLFUNC_CB_INFO();
		info->pyFunc = func;
		if(!param)
		{
			info->need_current = has_self == Py_True;
			param = NULL;
		}else
		{
			info->need_param = true;
			Py_XINCREF(param);
		}
		info->data = param;
		pySelf->SetCallInfo(info);
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCCallFuncND *, CPyCallFunc, initWithTarget, CallFuncDelegate::share(), __callfuncND_selector(CallFuncDelegate::On_SEL_CallFuncND), info);
		return 0;
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyActionManager, CPyCCObject, "CCActionManager", "Python CCActionManager Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyActionManager)
	PYCLASS_END_METHOD_DEF(CPyActionManager)
	PYCLASS_BEGIN_GETSET_DEF(CPyActionManager)
	PYCLASS_END_GETSET_DEF(CPyActionManager)
	PYCLASS_IMP_INTERFACE_NEW(CPyActionManager)


	int CPyActionManager::__init__(CPyActionManager *pySelf, PyObject *args, PyObject *kwds)
	{
		return 0;
	}

	void CPyActionManager::__del__(CPyActionManager *self)
	{
		self->ob_type->tp_free(self);
	}
	///////////////////////////////////////////////////////////////////////////////////////////
	PYCLASS_INIT_AND_BASE(CPyAnimation, CPyCCObject, "CCAnimation", "Python CCAnimation Object");
	PYCLASS_BEGIN_METHOD_DEF(CPyAnimation)
		PYCLASS_ADD_METHOD(CPyAnimation, addSpriteFrame)
		PYCLASS_ADD_METHOD(CPyAnimation, addSpriteFrameWithFileName)
		PYCLASS_ADD_METHOD(CPyAnimation, addSpriteFrameWithTexture)
		PYCLASS_ADD_METHOD(CPyAnimation, initWithAnimationFrames)
		PYCLASS_ADD_METHOD_EX(CPyAnimation, initWithSpriteFrames, METH_KEYWORDS|METH_VARARGS)
	PYCLASS_END_METHOD_DEF(CPyAnimation)
	PYCLASS_BEGIN_GETSET_DEF(CPyAnimation)
		PYCLASS_ADD_GET(CPyAnimation, TotalDelayUnits)
		PYCLASS_ADD_GET(CPyAnimation, Duration)
		PYCLASS_ADD_GETSET(CPyAnimation, DelayPerUnit)
		PYCLASS_ADD_GETSET(CPyAnimation, Frames)
		PYCLASS_ADD_GETSET(CPyAnimation, RestoreOriginalFrame)
		PYCLASS_ADD_GETSET(CPyAnimation, Loops)
	PYCLASS_END_GETSET_DEF(CPyAnimation)
	PYCLASS_IMP_INTERFACE_NEW(CPyAnimation)
	
	CPyAnimation::CPyAnimation(){};

	int CPyAnimation::__init__(CPyAnimation *pySelf, PyObject *args, PyObject *kwds)
	{
		cocos2d::CCAnimation *p = cocos2d::CCAnimation::create();
		pySelf->setCCObject(p);		
		return 0;
	}

	void CPyAnimation::__del__(CPyAnimation *self)
	{
		self->ob_type->tp_free(self);
	}

	PYCLASS_METHOD_IMPL(CPyAnimation, addSpriteFrame)
	{
		PyObject *frm = NULL;
		if( !PyArg_ParseTuple(pyArgs, "O", &frm) )
			Py_RETURN_NONE;
		if(!frm || !PyObject_TypeCheck(frm, CPyClassBase::GetTypeObject<CPySpriteFrame>()))
			Py_RETURN_NONE;
		CPySpriteFrame *pFrm = (CPySpriteFrame *)frm;
		
		CC_METHOD_WRAPPER_SETER(cocos2d::CCAnimation *, CPyAnimation, addSpriteFrame, (cocos2d::CCSpriteFrame *)pFrm->getCCObject());
		Py_RETURN_NONE;
	}

	PYCLASS_METHOD_IMPL(CPyAnimation, addSpriteFrameWithFileName)
	{
		char *frm_name = NULL;
		if( !PyArg_ParseTuple(pyArgs, "s", &frm_name) )
			Py_RETURN_NONE;
		if(!frm_name)
			Py_RETURN_NONE;		
		CC_METHOD_WRAPPER_SETER(cocos2d::CCAnimation *, CPyAnimation, addSpriteFrameWithFileName, frm_name);
		Py_RETURN_NONE;
	}

	PYCLASS_METHOD_IMPL(CPyAnimation, addSpriteFrameWithTexture)
	{
		PyObject *tex = NULL;
		PyObject *rt = NULL;
		if( !PyArg_ParseTuple(pyArgs, "OO", &tex, &rt) )
			Py_RETURN_NONE;
		if(!tex || !PyObject_TypeCheck(tex, CPyClassBase::GetTypeObject<CPyTexture2D>()))
			Py_RETURN_NONE;
		if(!rt || !PyObject_TypeCheck(rt, CPyClassBase::GetTypeObject<CPyRect>()))
			Py_RETURN_NONE;
		CPyTexture2D *texture = (CPyTexture2D *)tex;
		CPyRect *rect = (CPyRect *)rt;
		
		CC_METHOD_WRAPPER_SETER(cocos2d::CCAnimation *, CPyAnimation, addSpriteFrameWithTexture, (cocos2d::CCTexture2D *)texture->getCCObject(), rect->getCCObject());
		Py_RETURN_NONE;
	}

	PYCLASS_METHOD_IMPL(CPyAnimation, initWithAnimationFrames)
	{
		PyObject *frms = NULL;
		float delayPerUnit = 0;
		unsigned int loops = 0;
		if( !PyArg_ParseTuple(pyArgs, "OfI", &frms, &delayPerUnit, &loops) )
			Py_RETURN_FALSE;
		if(!frms || !PySequence_Check(frms))
			Py_RETURN_FALSE;
		Py_ssize_t s = PySequence_Size(frms);
		cocos2d::CCArray *arr = cocos2d::CCArray::create();
		for(Py_ssize_t i = 0; i < s; i ++)
		{
			CPyCCObject *act = (CPyCCObject *)PySequence_GetItem(frms, i);
			arr->addObject(act->getCCObject());
		}
		
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAnimation *, CPyAnimation, initWithAnimationFrames, bool, arr, delayPerUnit, loops);
		Py_RETURN_BOOL(v);
	}

	PYCLASS_METHOD_KW_IMPL(CPyAnimation, initWithSpriteFrames)
	{
		if( !pyArgs )
			Py_RETURN_FALSE;
		static char* kwlist[] = {"frames", "delay", NULL};
		PyObject *frames = NULL;
		float delay = 0;
		if(!PyArg_ParseTupleAndKeywords(pyArgs, pyKW, "O|f", kwlist, &frames, &delay))
			Py_RETURN_FALSE;
		if(!frames || !PySequence_Check(frames))
			Py_RETURN_FALSE;
		cocos2d::CCArray *arr = CCPyDataConvert::CCArrayFromPyList(frames);
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAnimation *, CPyAnimation, initWithSpriteFrames, bool, arr, delay);
		Py_RETURN_BOOL(v);
	}
		
	PYCLASS_GET_IMPL(CPyAnimation, TotalDelayUnits)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAnimation *, CPyAnimation, getTotalDelayUnits, float);
		return Py_BuildValue("f", v);
	}

	PYCLASS_GET_IMPL(CPyAnimation, Duration)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAnimation *, CPyAnimation, getDuration, float);
		return Py_BuildValue("f", v);
	}

	PYCLASS_GET_IMPL(CPyAnimation, DelayPerUnit)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAnimation *, CPyAnimation, getDelayPerUnit, float);
		return Py_BuildValue("f", v);
	}

	PYCLASS_SET_IMPL(CPyAnimation, DelayPerUnit)
	{
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCAnimation *, CPyAnimation, setDelayPerUnit, PyFloat_AsDouble(pyValue));
		return 0;
	}

	PYCLASS_GET_IMPL(CPyAnimation, Frames)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAnimation *, CPyAnimation, getFrames, cocos2d::CCArray *);
		return PyList_AsTuple(CCPyDataConvert::CCArrayToPyList(v));
	}

	PYCLASS_SET_IMPL(CPyAnimation, Frames)
	{
		cocos2d::CCArray *arr = CCPyDataConvert::CCArrayFromPyList(pyValue);
		if(!arr)
			return 0;
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCAnimation *, CPyAnimation, setFrames, arr);
		return 0;
	}
	
	PYCLASS_GET_IMPL(CPyAnimation, RestoreOriginalFrame)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAnimation *, CPyAnimation, getRestoreOriginalFrame, bool);
		Py_RETURN_BOOL(v);
	}

	PYCLASS_SET_IMPL(CPyAnimation, RestoreOriginalFrame)
	{
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCAnimation *, CPyAnimation, setRestoreOriginalFrame, pyValue == Py_True);
		return 0;
	}
	
	PYCLASS_GET_IMPL(CPyAnimation, Loops)
	{
		CC_METHOD_WRAPPER_GETER(cocos2d::CCAnimation *, CPyAnimation, getLoops, unsigned int);
		return Py_BuildValue("I", v);
	}

	PYCLASS_SET_IMPL(CPyAnimation, Loops)
	{
		CC_METHOD_WRAPPER_SETER_RINT(cocos2d::CCAnimation *, CPyAnimation, setLoops, PyLong_AsUnsignedLong(pyValue));
		return 0;
	}
NS_CCPY_END

#endif